home *** CD-ROM | disk | FTP | other *** search
- -- card: 9040 from stack: in
- -- bmap block id: 6567
- -- flags: 0000
- -- background id: 4812
- -- name: !Inventory
- ----- HyperTalk script -----
- on opencard
- if card field "refresh objects" of card "!globaldata" then
- fixinvenitems
- end if
- fixinvenbuttons
- end opencard
-
- on fixinvenitems
- set the lockscreen to true
- put empty into card field "objects"
- put card field "totalobjects" of card "!globaldata" into top
- put 1 into thing
- put 0 into card field "weightcarried"
- repeat with oof = 1 to top
- put line oof of card field "objectnames" of card "!globaldata" into nextobject
- put bkgnd field "location" of card nextobject into it
- if it is "carried" then
- put nextobject into line thing of card field "Objects"
- add 1 to thing
- put field "weight" of card nextObject into w
- add w to card field "weightcarried"
- end if
- end repeat
- subtract 1 from thing
- if thing is 0 then
- put "Nothing carried" into card field "Objects"
- end if
- put thing into card field "NumberCarried"
- set lockscreen to false
- end fixinvenitems
-
- on idle
- get scroll of card field objects
- divide it by 18
- put trunc(it+.5) into it
- multiply it by 18
- set scroll of card field objects to it
- end idle
-
- on fixinvenbuttons
- put 3 into i
- repeat until i is 15
- set the hilite of card button id i to false
- add 1 to i
- end repeat
- end fixinvenbuttons
-
-
- -- part 2 (field)
- -- low flags: 01
- -- high flags: 0007
- -- rect: left=277 top=56 right=311 bottom=487
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 5
- -- text size: 14
- -- style flags: 0
- -- line height: 18
- -- part name: Objects
- ----- HyperTalk script -----
- on mouseup
- put the short name of me into myname
- put the clickloc into here
- put (item 2 of here - item 2 of the rect of me) into y
- put trunc(y/(the textheight of me)) into linesdown
- put trunc((the scroll of me)/(the textheight of me)) into scrolldown
- put linesdown+scrolldown+1 into linenumber
- put line linenumber of card field myname into thingfish
- if thingfish is not "Nothing Carried" then go card thingfish
- end mouseup
-
-
- -- part 3 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=57 right=74 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 4 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=75 right=92 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=93 right=110 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=111 right=128 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=129 right=146 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 8 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=147 right=164 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 9 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=165 right=182 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 10 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=183 right=200 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 11 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=201 right=218 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 12 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=219 right=236 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 13 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=237 right=254 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 14 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=255 right=272 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 15 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=273 right=290 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 16 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=260 top=291 right=308 bottom=278
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 18 (button)
- -- low flags: 00
- -- high flags: 2005
- -- rect: left=252 top=356 right=370 bottom=270
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 20 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=212 top=102 right=122 bottom=245
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 5
- -- text size: 14
- -- style flags: 0
- -- line height: 18
- -- part name: NumberCarried
-
-
- -- part 21 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=120 top=138 right=158 bottom=154
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 5
- -- text size: 14
- -- style flags: 0
- -- line height: 18
- -- part name: WeightCarried
-
-
- -- part 22 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=277 top=33 right=55 bottom=487
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 5
- -- text size: 14
- -- style flags: 0
- -- line height: 18
- -- part name: Drop
- ----- HyperTalk script -----
- on mouseUp
- if card field "objects" is "Nothing here" then
- fixinvenbuttons
- exit mouseup
- end if
- put scroll of card field "Objects" into it
- divide it by 18
- put it into LinesUp
- put false into droppedanything
- put card field "yourloc" of card "!globalData" into where
- repeat with num = 3 to 14
- if hilite of card button id num is true then
- put line ( LinesUp + num - 2 ) of card field "objects" into nextObject
- if nextObject is not empty then
- put where into bkgnd field "location" of card NextObject
- end if
- end if
- end repeat
- set the scroll of card field "objects" to 0
- fixinvenitems
- fixinvenbuttons
- end mouseUp
-
-
-
- -- part 24 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=16 top=265 right=322 bottom=246
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 5
- -- text size: 14
- -- style flags: 0
- -- line height: 18
- -- part name: Return to Location
- ----- HyperTalk script -----
- on mouseUp
- put card field "yourloc" of card "!globaldata" into it
- go card it
- end mouseUp
-
-
-
- -- part contents for card part 20
- ----- text -----
- 0
-
- -- part contents for card part 21
- ----- text -----
- 0
-
- -- part contents for card part 2
- ----- text -----
- Nothing carried